<?php
require 'db.php';
require 'function.php';

$id = $_GET['id'];
$admin = new Manager($link);
if ($id != 1){
    $query = $admin->deleteAdmin($id);
    if ($query){
        header("Location:m_admin.php");
    }else{
        echo "<script>alert('超级管理员无法删除！');</script>";
        echo "<script>history.go(-1);</script>";
        exit();
    }
}else{
    echo "<script>alert('超级管理员无法删除！');</script>";
    echo "<script>history.go(-1);</script>";
    exit();
}



?>